package com.mojawa.mj_amap

import android.os.Bundle
import com.amap.api.maps.MapView


/**
 * 显示高德地图 --- 生命周期
 */
class MJMApViewLifecycle {
    /**
     *创建地图
     */
    //在activity执行onDestroy时执行mMapView.onDestroy()，销毁地图
    fun onCreate(savedInstanceState: Bundle?, mapView: MapView?) {
        mapView?.onCreate(savedInstanceState)
    }

    fun onResume(mapView: MapView?) {
        mapView?.onResume()
    }

    fun onPause(mapView: MapView?) {
        mapView?.onPause()
    }

    fun onDestroy(mapView: MapView?) {
        mapView?.onDestroy()
    }
    fun onSaveInstanceState(savedInstanceState: Bundle?, mapView: MapView?){
        mapView?.onSaveInstanceState(savedInstanceState)
    }
}